# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-aiosmtplib
_pkgname=${pkgname#python-}
pkgver=4.0.1
pkgrel=1
pkgdesc='Asynchronous SMTP client for use with asyncio.'
arch=('any')
url='https://pypi.org/project/aiosmtplib/'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('2571adafe2280d2e49e7d52fc111d5a90e167ef26320448bfe82df4ee772f75ae48dfa514412040d1af801aff15345e6702cffd9d36df813ae7e6784f5e4a504')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    "$_pkgname"
}

